This invention relates to data which is stored on removable data storage media, such as removable cartridges, and, more particularly, to providing access to data stored on removable random access data storage media in an environment of tape or optical disk data storage media.
Tape data storage media, typically employing magnetic tape in a cartridge, is well known for storing large quantities of data efficiently. Typically, multiple data sets are stored together, or xe2x80x9cstackedxe2x80x9d, in a single cartridge to take advantage of the high data storage capacity of the cartridge. Also typically, the data of each data set is, at least initially, written as a sequential string of data, and the data sets are written as sequential set of strings of data.
The data is typically written in a non-streaming manner, in that, as the host processes information and fills buffers with the data to be written, the tape is stopped and then started. It is not practical to employ another write or read process during the time between writes, since the tape would have to be wound or unwound to access another location, and the waits in the original writing process are far shorter than the access time to the other location.
Optical disk data storage media, typically employing an optical disk in a cartridge, also stores large quantities of data efficiently. While running in a drive, the disk is continually rotating, but track-to-track access is relatively slow, so that the data is written in discontinuous sectors on the same or adjacent tracks in a non-streaming manner, as discussed above, until a track is full. Thus, again, it is not practical to employ another write or read process during the time between writes, since the optical head would have to access other tracks, and the waits in the original writing process are far shorter than the access time to the other track.
In one arrangement, each data set may have a particular sequential amount of tape or optical disk storage capacity allocated to it. Thus, as data is added to the data set, it is written at an xe2x80x9cappend pointxe2x80x9d at the end of the previously written data set. Should the added data continue beyond the allocated storage capacity, and another stacked data set follow, the data is written at the next available location on the tape or optical disk. In another arrangement, the tape or optical disk storage capacity allocated to each data set is variable, and therefore is more efficiently stored. In such a case, as data is added to a data set which is followed by another stacked data set, the append point actually becomes the next available location on the tape or optical disk.
Further, as data sets are read, altered and rewritten, the desire is to rewrite the data in the same space on the tape or optical disk as the original data set. However, as above, the data to be rewritten may extend beyond the allocated storage capacity, and the data set is split and the additional data stored on the next available location on the tape or optical disk.
Typically, access to the tape or optical disk cartridge is slow. For example, a single tape or optical disk drive may require manual retrieval of a tape or optical disk cartridge from storage. Automated data storage libraries are able to store large numbers of cartridges in storage shelves and have a robot for retrieving the cartridges from the storage shelves and loading a cartridge in a data storage drive and thereby speeding the retrieval of the cartridges.
Once the cartridge is retrieved and loaded into a data storage drive, read or write access to specific data sets is sequential and relatively slow. A tape is typically rewound to a predetermined point when it is stored, called xe2x80x9cbeginning of tapexe2x80x9d, or xe2x80x9cBOTxe2x80x9d. To access a desired data set, the tape is then wound to the location of the desired data set, the data is read until the next data set is encountered, and the tape is then wound to the location of the append point for the data set. The data transfer is interrupted while the tape is being wound, since no data can be read from the desired data set while the tape is being wound to the append point. Similarly, optical disk systems require that the laser be initialized to the media at a specific section of the disk before any access is conducted. Further, the random access from track-to-track is relatively slow, so that any data transfer is interrupted during the track-to-track access to an append point. Thus, many tape and optical disk systems provide extensive data buffering systems to present the data so as to appear as though it had been in a single, continuous sequence. The same issue occurs during write access, and the data is typically buffered and then written over the previously read data at the various non-sequential locations.
In the incorporated U.S. patent application Ser. No. 09/970,881, as a means of speeding access to data, the data is stored by removable random access data storage media, such as xe2x80x9chardxe2x80x9d magnetic disks in cartridges, and corresponding data storage drives which can read and write the random access media, provided, for example, in automated data storage libraries, as a portion of the removable data storage media. As described therein, a xe2x80x9cpartitionxe2x80x9d is a related group of data that may be contiguous or discontiguous, and sequential or non-sequential on a random access medium.
Random access data storage media are more typically employed for smaller lengths of data, such as sectors, and provide direct access to the data, for example, by rapidly moving a read/write head to the track containing the desired data.
However, tape and optical disk systems are designed to read and write the data sequentially rather than randomly.
Further, only one host can be serviced at a time with a given tape or optical disk. It is not workable to go back and forth between different locations on tape or optical disk and try to thereby service more than one request. Therefore, concurrent requests for data sets on the same tape or optical disk are queued and served serially.
It is an object of the present invention to provide concurrent access by at least one host to data sets on the same removable data storage medium, employing a random access data storage medium.
A method, a data storage drive, and an automated data storage library are provided in accordance with the present invention, for accessing data on a removable random access data storage medium, such as a cartridge containing a magnetic disk.
The data stored on the removable random access data storage medium comprises a plurality of data segments, at least some of the data segments comprising at least one common data stream, called a partition, simulating tape or optical disk sequential data. The removable random access data storage medium is accessible at and removable from the data storage drive. The data storage drive is arranged as a plurality of logical accessors, and each logical accessor is arranged to communicate with at least one host for read and/or write access to the removable random access data storage medium.
A control responds to a read and/or write access of one of the logical accessors to one of the partition. Upon occurrence of a write access for a partition by one of the logical accessors, the control establishes, as a write accessed context, at least the data segment of the identified partition for the write access, and locks the write accessed context to a write access logical accessor. The control then operates a read/write access unit to access the write accessed context for the locked write access logical accessor.
As the writing is conducted in a discontinuous manner, the control allows concurrent read access to the data of the removable random access data storage medium by other logical accessors than a locked write access logical accessor, preventing read access to the write accessed context by any logical accessor other than the locked write access logical accessor; and preventing write access to any data of the locked partition by other than the logical accessor having locked write access to the partition; and upon completion of the write access by the locked write access logical accessor, releases the locking of the write accessed context to the locked write access logical accessor.
Once writing is conducted at any point in a data set, the remainder of the data subsequent to the point at which the writing occurs is no longer valid as per conventional sequential device behavior. Therefore, in one embodiment of the present invention, a write accessed context may comprise the data segments comprising the total amount of data from the present write to the end of the data set.
In another aspect of the present invention, the read random accessed data segments are organized for sequential access by the host.
Thus, the present invention takes advantage of the wait periods during the discontinuous read and write processes to utilize the high speed random access of the random access medium to provide concurrent access to different data sets. The present invention also allows time sharing of such access in an arbitrary manner, such as round robin, or in a performance weighted manner.
For a fuller understanding of the present invention, reference should be made to the following detailed description taken in conjunction with the accompanying drawings.